import request from "@/utils/request";
/** 预约信息参数 */
export interface ReservationInfoQuery {
  lawFirmId?: number;
  clientId?: string;
  userType?: string;
  date?: string;
  current?: number;
  pageSize?: number;
}
/** 预约信息表单数据 */
export interface ReservationInfoForm {
  id?: number;
  caseType?: string;
  clientUserId?: string;
  clientUserName?: string;
  lawFirmId?: number;
  lawFirmName?: string;
  lawyerId?: number;
  lawyerName?: string;
  bookingDate?: string;
  bookingTime?: string;
  reservationTimeInfoList?: any;
  status?: string;
  caseDetail?: string;
  createdAt?: string;
  updateAt?: string;
  address?: string;
  orderId?: string;
}
/** 城市数据分页对象 */
export interface ReservationInfoVO {
  records?: any;
  total: number;
  size?: number;
  current?: number;
  pages?: number;
}
class reservationInfoAPI {
  /** 查询预约信息 */
  static getReservationInfo(params: ReservationInfoQuery) {
    return request<any, ReservationInfoVO>({
      url: "/api/reservation/info/getPage",
      method: "post",
      data: params,
    });
  }
  /** 根据id删除 */
  static deleteReservationInfo(id?: number) {
    return request<any, ReservationInfoVO>({
      url: `/api/reservation/info/${id}`,
      method: "delete",
      // data: params,
    });
  }
  /** 更新预约信息 */
  static updateReservationInfo(params: ReservationInfoForm) {
    return request<any, ReservationInfoVO>({
      url: "/api/reservation/info",
      method: "post",
      data: params,
    });
  }
}

export default reservationInfoAPI;
